#ifndef __QyTexturePool__
#define __QyTexturePool__

#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>

class QGLWidget;
namespace QyGL { class Texture; };

class QyTexturePool {
public:
    QyTexturePool( const QString & path = QString() );
    virtual ~QyTexturePool();

    bool loadFrom( const QString & path );
    bool loadFile( const QString & filePath );
    void loadFiles( const QStringList & files );
    QList<QyGL::Texture*> makeSet( const QStringList & keys );

    static QyTexturePool * staticPool();

    QMap<QString,QyGL::Texture*> textures;
    QString basePath;
    QGLWidget * glWidget;

};

#endif//__QyTexturePool__
